function a(){
	var num=0;
	document.write('<table  border="1" style="border-collapse:collapse" align="center" width="500" height="500">');
	for(var i=1;i<=5;i++){
		document.write('<tr>');
		for(var j=1;j<=5;j++){
			num++;
			document.write('<td align="center"><img src="img/21.png"  id="img'+num+'" onclick="b('+num+')" /></td>');
		}
		document.write('</tr>');
	}
	document.write('<tr><td colspan="5" align="center">重置</td><tr>')
	document.write('</table>');
}
a();
function b(num)
{
	var obj=document.getElementById("img"+num);
	var imgs=obj.src.replace("http://127.0.0.1:8020/%E4%B8%BA%E4%BD%95%E8%BF%99%E4%B9%88%E7%83%AD","");
	if (imgs=="/img/1.png") {
		document.getElementById("img"+num).src="img/2.png";
		} 
		else{
		document.getElementById("img"+num).src="img/1.png";
	}
}
